﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ServiceImplementation.Translator
{
    /// <summary>
    /// Define AuthorityLevelDTO Translator
    /// </summary>
    class AuthorityLevelDTOTranslator
    {
        /// <summary>
        /// To Translate AuthorityLevelDTO to AuthorityLevelBusinessEntity
        /// </summary>
        /// <param name="authoritylevelDTO"></param>
        /// <returns></returns>
        public static BLL.AuthorityLevel TranslateDTOToBusiness(DataContracts.AuthorityLevelDTO authoritylevelDTO)
        {
            BLL.AuthorityLevel authoritylevelBE = new BLL.AuthorityLevel();
            authoritylevelBE.LevelId = authoritylevelDTO.LevelId;
            authoritylevelBE.LevelName = authoritylevelDTO.LevelName;
            return authoritylevelBE;
        }

        /// <summary>
        /// To Translate AuthorityLevelBusinessEntity to AuthorityLevelDTO
        /// </summary>
        /// <param name="authoritylevelBE"></param>
        /// <returns></returns>
        public static DataContracts.AuthorityLevelDTO TranslateBusinessToDTO(BLL.AuthorityLevel authoritylevelBE)
        {
            DataContracts.AuthorityLevelDTO authoritylevelDTO = new DataContracts.AuthorityLevelDTO();
            authoritylevelDTO.LevelId = authoritylevelBE.LevelId;
            authoritylevelDTO.LevelName = authoritylevelBE.LevelName;
            return authoritylevelDTO;
        }
    }
}
